cmake_minimum_required(VERSION 3.4.1)



#include_directories(
#       ${CMAKE_SOURCE_DIR}/src/main/cpp/soundtouch/SoundStretch
#       )
add_library(myVideo
             SHARED
              src/main/cpp/CallJava.cpp
              src/main/cpp/PlayStatus.cpp
              src/main/cpp/YAudio.cpp
              src/main/cpp/YFFmpeg.cpp
              src/main/cpp/YQueue.cpp
             src/main/cpp/YVideo.cpp
             src/main/cpp/yyl_log.cpp
             src/main/cpp/yyl_player.cpp

             #test
             src/main/cpp/testJni/demo.cpp
             src/main/cpp/testJni/pthreadDemo.cpp
             src/main/cpp/testJni/OnCallBack.cpp

            src/main/cpp/soundtouch/SoundTouch/AAFilter.cpp
            src/main/cpp/soundtouch/SoundTouch/FIFOSampleBuffer.cpp
            src/main/cpp/soundtouch/SoundTouch/FIRFilter.cpp
            src/main/cpp/soundtouch/SoundTouch/cpu_detect_x86.cpp
            src/main/cpp/soundtouch/SoundTouch/sse_optimized.cpp
       ##     src/main/cpp/soundtouch/SoundStretch/WavFile.cpp
            src/main/cpp/soundtouch/SoundTouch/RateTransposer.cpp
            src/main/cpp/soundtouch/SoundTouch/SoundTouch.cpp
            src/main/cpp/soundtouch/SoundTouch/InterpolateCubic.cpp
            src/main/cpp/soundtouch/SoundTouch/InterpolateLinear.cpp
            src/main/cpp/soundtouch/SoundTouch/InterpolateShannon.cpp
            src/main/cpp/soundtouch/SoundTouch/TDStretch.cpp
            src/main/cpp/soundtouch/SoundTouch/BPMDetect.cpp
            src/main/cpp/soundtouch/SoundTouch/PeakFinder.cpp

             )

add_library( avcodec-57 SHARED IMPORTED)
set_target_properties( avcodec-57
                       PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libavcodec-57.so)


add_library( avdevice-57 SHARED IMPORTED)
set_target_properties( avdevice-57
                       PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libavdevice-57.so)


add_library( avfilter-6 SHARED IMPORTED)
set_target_properties( avfilter-6
                       PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libavfilter-6.so)


add_library( avformat-57 SHARED IMPORTED)
set_target_properties( avformat-57
                       PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libavformat-57.so)


add_library( avutil-55 SHARED IMPORTED)
set_target_properties( avutil-55
                       PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libavutil-55.so)

add_library( postproc-54 SHARED IMPORTED)
set_target_properties( postproc-54
                       PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libpostproc-54.so)

add_library( swresample-2 SHARED IMPORTED)
set_target_properties( swresample-2
                       PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libswresample-2.so)


add_library( swscale-4 SHARED IMPORTED)
set_target_properties( swscale-4
                       PROPERTIES IMPORTED_LOCATION
                       ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libswscale-4.so)

message("当前环境是= ${ANDROID_ABI}")
include_directories(
    ${CMAKE_SOURCE_DIR}/head/include
    )
include_directories(
        ${CMAKE_SOURCE_DIR}/src/main/cpp/soundtouch/include
        )
include_directories(
        ${CMAKE_SOURCE_DIR}/src/main/cpp/soundtouch/SoundTouch
        )

target_link_libraries(
                       myVideo

                        avcodec-57
                                              avdevice-57
                                              avfilter-6
                                              avformat-57
                                              avutil-55
                                              postproc-54
                                              swresample-2
                                              swscale-4



                       log
                       OpenSLES
                       )